using System;
using System.Collections.Generic;
using System.Text;

namespace EuropeEngulfed.NET
{
    abstract class RegionState
    {
        protected MapInfo.RegionID regionID;

        public MapInfo.RegionID RegionID
        {
            get
            {
                return regionID;
            }
        }

        public abstract void SetAllAxisPlayingPiecesAsUnSupplied(GameState gameState);

        public abstract void SetAllAlliedPlayingPiecesAsUnSupplied(GameState gameState);

        public abstract System.Xml.XmlNode Serialise(System.Xml.XmlDocument xml);

        public static RegionState Deserialise(System.Xml.XmlNode node)
        {
            if (node.Name == "LandRegionState")
                return LandRegionState.Deserialise(node);
            else if (node.Name == "SeaRegionState")
                return SeaRegionState.Deserialise(node);
            else
                return null;
        }

        public abstract bool Equals(RegionState regionStateToCompare);
    }
}
